<% #endcoding:utf-8%>
      <div class="demand">
        <div class="avatar">
          <a href="/usercard/<%=offer.user_id%>"><%=raw avatar User.find(offer.user_id),'img-circle img-small'%></a>
        </div>
        <div class="demand-info">
          <p class="timeago"><%=link_to "需求",demand_path(offer.demand),class:"timeago"%> · 报价于 · <%=time_ago_in_words(offer.created_at)%>以前</p>
          <p class="price"><%=offer.price%>元</p>
        </div>
        <div class="operator">
          <% @demand = offer.demand %>
          <%if @demand.status<2&&ismydemand?(@demand) %>
              <%=link_to "中标","javascript:void(0)",:onclick=>"window.deal=deal;deal("+@demand.id.to_s+","+offer.id.to_s+",'"+demand_deals_path(@demand)+"',this)",:class=>'btn btn-success dealbtn',:id=>"offer-"+offer.id.to_s%>
          <%end%>
          <%if isbited?(offer,@demand) %>
              <%=image_tag "bit50.png"%>
              <%if @demand.status>2%>
                  <%=image_tag "go_locker.png"%>
              <%end%>
              <%if ismyoffer?(offer)&&@demand.status<3%>
                  <%=link_to "接单","javascript:void(0)",:onclick=>"window.takeOrder=takeOrder;takeOrder("+offer.id.to_s+",this,"+@demand.user_id.to_s+","+@demand.id.to_s+")",:class=>'btn btn-success'%>
              <%end%>

          <%end%>
        </div>
      </div>
